import http from "@/utils/request";

// export const getUser = (params) => {
//   //返回用户列表
//   return http.get("/userinfo/page", {
//     params: {
//       curPage: params.curPage,
//       limit: params.limit,
//       sname: params.sname,
//     },
//   });
// };

export const addUser = (data) => {
  //增加用户
  return http.post("/admin/register", data);
};
// export const editUser = (data) => {
//   //更新用户
//   return http.post("/userinfo/edituser", data);
// };
// export const delUser = (param) => {
//   //删除用户
//   const myparams = new URLSearchParams();
//   myparams.append("uid", param);
//   return http.post("/userinfo/deluser/", myparams);
// };

export const login = (params) => {
  //登录
  return http.post("/admin/login", {
    username: params.username,
    password: params.password,
    vercode: params.vercode,
  });
};
